<template>
	<view  style='overflow: auto;'>
		<view class="topic-new" style='overflow: auto;'>
			<view class="topic-new-title">最近更新</view>
			<block v-for="(item,index) in list" :key='index'>
				<view class="topic-list u-f" @tap="toTopicDetail">
					<image :src="item.titlepic" mode="widthFix" lazy-load></image>
					<view class="topic-list-right">
						<view class="title">{{item.title}}</view>
						<view>{{item.desc}}</view>
						<view>动态 {{item.totalnum}} 今日 {{todaynum}} </view>
					</view>
				</view>
			</block>
		</view>
	</view>
</template>

<script>
	export default {
		props : {
			list:Array
		},
		methods:{
			toTopicDetail(){
				uni.navigateTo({
					url:"../../pages/topic-detail/topic-detail"
				})
			}
		}
	}
</script>

<style scoped>
	.topic-new {
		padding:20upx;
	}
	.topic-new-title {
		font-size: 32upx;
	}
	.topic-new .topic-list {
		border-bottom: 1upx solid #eee;
		padding: 20upx 0;
	}
	.topic-list image {
		width:160upx;
		height:160upx;
		border-radius: 10upx;
		margin-right:20upx;
		
	}
	.topic-new .topic-list-right .title {
		font-size: 36upx;
		color:#333;
	}
	.topic-new .topic-list-right > view{
		font-size: 28upx;
		color:#b2b2b2;
	}
</style>
